<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Go WebAssembly</title>
    <script src="wasm_exec.js"></script> <!-- 引入 wasm_exec.js -->
    <script>
        async function initWasm() {
            const go = new Go();
            const wasm = await WebAssembly.instantiateStreaming(fetch("main.wasm"), go.importObject);
            go.run(wasm.instance);

            // 调用 Go WebAssembly 中的 sayHello 函数
            sayHello();
            test()
        }

        window.onload = initWasm;
    </script>
</head>
<body>
<h1>Go WebAssembly Demo</h1>
</body>
</html>
